﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _1._1._1_URI
{
    class Program
    {
        static void Main(string[] args)
        {
            //System.Uri:通用资源标识符
            Uri uri = new Uri("http://www.baidu.com?id=123");
            Console.WriteLine(uri.Host);//主机：www.baidu.com
            Console.WriteLine(uri.Scheme);//协议类型：http
            Console.WriteLine(uri.Port);//端口号:port
            Console.WriteLine(uri.Query);//？查询的语句
            Console.ReadKey();

        }
    }
}
